package com.chianghao.nio.core.handle.http;

import java.util.HashMap;
import java.util.Map;

/**
 * @author ChiangHao
 * @date 2022/11/5 15:41
 */
public class HttpRequest {

    private String url;

    private HttpMethod method;

    private String contentType;

    private String version;

    private Map<String,String> headerMap;

    private byte[] body;

    public HttpRequest(){
        headerMap = new HashMap<>(10);
    }


    private Map<String,String> queryParams;

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public HttpMethod getMethod() {
        return this.method;
    }

    public void setMethod(HttpMethod method) {
        this.method = method;
    }

    public String getVersion() {
        return this.version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Map<String, String> getHeaderMap() {
        return this.headerMap;
    }

    public void setHeaderMap(Map<String, String> headerMap) {
        this.headerMap = headerMap;
    }

    public byte[] getBody() {
        return this.body;
    }

    public void setBody(byte[] body) {
        this.body = body;
    }

    public Map<String, String> getQueryParams() {
        return this.queryParams;
    }

    public void setQueryParams(Map<String, String> queryParams) {
        this.queryParams = queryParams;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }
}
